package models;

import play.db.jpa.Model;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.security.PublicKey;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: TOSHIBA
 * Date: 17/03/12
 * Time: 14:10
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class Country extends Model {

    public String name;
    public String code;
    public String shortName;

    public Date createdOn;
    public Date deletedOn;

    @ManyToOne
    public User createdBy;

    @ManyToOne
    public User deletedBy;

    @ManyToOne
    public Currency currency;

    
    public Country(String name, String code, String shortName, Currency currency) {
        this.code = code;
        this.name = name;
        this.currency = currency;
        this.shortName = shortName;
        
    }

    @Override
    public String toString() {
        return this.name;    //To change body of overridden methods use File | Settings | File Templates.
    }
}
